Package edu.uky.ai.lp.logic
Class Term
java.lang.Object
edu.uky.ai.lp.logic.Term
- All Implemented Interfaces:
Formula
public abstract class Term extends java.lang.Object implements Formula
The superclass of all logical expression representing specific things in the
universe.
- Author:
- Stephen G. Ware
-
Field Details
-
name
public final java.lang.String nameThe unique name of the term
-
-
Constructor Details
-
Term
public Term(java.lang.String name)Constructs a new term with a given name.- Parameters:
name- the name of the term
-
-
Method Details
-
equals
public boolean equals(java.lang.Object other)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
substitute
Description copied from interface:FormulaReturn a version of this formula with its variables replaced with the values assigned to them by a unifier.- Specified by:
substitutein interfaceFormula- Parameters:
unifier- the unifier- Returns:
- the formula with variables replaced
-